package com.china.springServer.controller;

import com.china.springServer.service.KafkaProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @fileName: KafkaController
 * @author: LmR
 * @createDate: 2023/10/21 16:56
 * @Desc:
 */
@RestController
@RequestMapping("/kafka")
public class KafkaController {

    @Autowired
    private KafkaProducer kafkaProducer;

    @RequestMapping("/sendMessage")
    public void sendMessage() {
        kafkaProducer.sendMessage("hello kafka");
    }
}
